<!--
 * @copyright: Huang Ding
 * @Author: ding-cx
 * @Date: 2021-01-08 11:01:21
 * @LastEditors: ding-cx
 * @LastEditTime: 2021-03-27 13:57:10
 * @Description: file content
-->
<template>
  <div>
    
    <base-crud-table
      ref="crud"
      :option="option"
      :data="data.rows"
      :loading="loading"
      :page="page"
      @refresh="refresh"
      @page-change="pageChange"
      @search-submit="searchSubmit"
      @search-change="searchChange"
      @selection-change="selectionChange"
      @row-dblclick="onRowDblclick"
      @add-submit="addSubmit"
      @row-edit-submit="rowEditSubmit"
      @row-del="rowDel"
    >
      <template #headerMenuLeft="">
        <!-- :headers="uploadHeaders"
           -->
        <el-upload
          class="upload-demo"
          :http-request="uploadFunc"
          :action="'http://localhost:7001' + apiName"
          :on-preview="handlePreview"
          :on-remove="handleRemove"
          :before-remove="beforeRemove"
          multiple
          :limit="3"
          :on-exceed="handleExceed"
          :file-list="fileList"
        >
          <el-button type="primary" size="mini" icon="el-icon-upload"
            >上传文件示例</el-button
          >
          <!-- <div slot="tip" class="el-upload__tip">
            只能上传jpg/png文件，且不超过500kb
          </div> -->
        </el-upload>
      </template>
      <template #url-col="{scope}">
          <a target="_blank" :href="scope.row.url">{{scope.row.url}}</a>
      </template>
    </base-crud-table>
  </div>
</template>

<script src="./setup.js">
</script>

<style>
</style>